<!DOCTYPE html>
<html>
<head>
    <title>位置管理
</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <!--<div class="grid-btn">
			<#if shiro.hasPermission("basics:blocation:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("basics:blocation:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("basics:blocation:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>-->
        <div class="layui-row">
            <div class="layui-col-xs2">
                <div class="layui-col-xs4 prop">
                    <span>位置名称</span>
                </div>
                <div class="layui-col-xs8 select-content">
                    <i-input v-model="search.name"  />
                </div>
            </div>

            <!-- <div class="layui-col-xs3">
                 <div class="layui-col-xs3 prop">
                     <span>所属部门</span>
                 </div>
                 <div class="layui-col-xs9 select-content">
                     &lt;!&ndash;<i-input  v-model="search.departmentId"  />&ndash;&gt;
                     <Cascader :data="list" change-on-select  v-model="search.departmentId"></Cascader>
                 </div>
             </div>-->

            <div class="layui-col-xs5">
                <a class="btn btn-primary" @click="query"><i class="fa fa-search"></i>&nbsp;查询</a>
                <a class="btn btn-primary" @click="reset"><i class="fa fa-refresh"></i>&nbsp;重置</a>
            </div>
        </div>
        <div class="layui-row" style="margin-top: 2px">
            <div class="layui-col-xs12">
                <#if shiro.hasPermission("basics:blocation:save")>
                <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
                </#if>
                <#if shiro.hasPermission("basics:blocation:update")>
                <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
                </#if>
                <#if shiro.hasPermission("basics:blocation:delete")>
                <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
                 </#if>
            </div>
        </div>


        <table id="jqGrid" ></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <!-- <form class="form-horizontal">

                                                                         <div class="form-group">
                       <div class="col-sm-2 control-label">位置名称</div>
                       <div class="col-sm-10">
                           <input type="text" class="form-control" v-model="bLocation.name" placeholder="位置名称"/>
                       </div>
                   </div>

                                                               <div class="form-group">
                       <div class="col-sm-2 control-label">方位 东南西北</div>
                       <div class="col-sm-10">
                           <input type="text" class="form-control" v-model="bLocation.position" placeholder="方位 东南西北"/>
                       </div>
                   </div>
                                                               <div class="form-group">
                       <div class="col-sm-2 control-label">库房id</div>
                       <div class="col-sm-10">
                           <input type="text" class="form-control" v-model="bLocation.warehouseId" placeholder="库房id"/>
                       </div>
                   </div>
                                                               <div class="form-group">
                       <div class="col-sm-2 control-label">备注</div>
                       <div class="col-sm-10">
                           <input type="text" class="form-control" v-model="bLocation.remark" placeholder="备注"/>
                       </div>
                   </div>
                                                               <div class="form-group">
                       <div class="col-sm-2 control-label">系统id</div>
                       <div class="col-sm-10">
                           <input type="text" class="form-control" v-model="bLocation.systemId" placeholder="系统id"/>
                       </div>
                   </div>
                                                               <div class="form-group">
                       <div class="col-sm-2 control-label">创建人</div>
                       <div class="col-sm-10">
                           <input type="text" class="form-control" v-model="bLocation.createId" placeholder="创建人"/>
                       </div>
                   </div>
                                                               <div class="form-group">
                       <div class="col-sm-2 control-label"></div>
                       <div class="col-sm-10">
                           <input type="text" class="form-control" v-model="bLocation.createTime" placeholder=""/>
                       </div>
                   </div>
                                                               <div class="form-group">
                       <div class="col-sm-2 control-label">跟新人</div>
                       <div class="col-sm-10">
                           <input type="text" class="form-control" v-model="bLocation.updateId" placeholder="跟新人"/>
                       </div>
                   </div>
                                                               <div class="form-group">
                       <div class="col-sm-2 control-label">跟新时间</div>
                       <div class="col-sm-10">
                           <input type="text" class="form-control" v-model="bLocation.updateTime" placeholder="跟新时间"/>
                       </div>
                   </div>
                                                               <div class="form-group">
                       <div class="col-sm-2 control-label">是否删除 0 否 1是</div>
                       <div class="col-sm-10">
                           <input type="text" class="form-control" v-model="bLocation.isDel" placeholder="是否删除 0 否 1是"/>
                       </div>
                   </div>

       </form>-->
        <i-form  class="form-horizontal"  ref= 'bLocation' :model="bLocation"  :rules='ruleValidate' :label-width="80">

            <form-item label="位置名称" prop='name' >
                <i-input  v-model="bLocation.name" :readonly="isShow"  placeholder="请输入位置名称"></i-input>
            </form-item>
            <form-item label="方位" prop='position' >
                <!-- <i-input  v-model="bGoods.unitId" :readonly="isShow"  placeholder="请选择货物单位"></i-input>-->
                <el-select v-model="bLocation.position"  :disabled="isShow" placeholder="请选择方位" @change="selectChange"  style=" width: 100%;">
                    <el-option
                            v-for="item in bLocationPositionList"
                            :key="item.id"
                            :label="item.name"
                            :value="item.id">
                    </el-option>
                </el-select>
            </form-item>
            <form-item label="是否启用" prop='isUsed' >
                <i-switch :disabled="isShow" @on-change="changeUsed"  v-model="isUsed" ></i-switch>
            </form-item>

            <form-item label="备注" prop="remark">
                <i-input v-model="bLocation.remark" :readonly="isShow"  type="textarea" v-autosize="{minRows: 2,maxRows: 5}"></i-input>
            </form-item>
            <form-item >
                <i-button type="primary" v-if="title!='详情'" @click="saveOrUpdate('bLocation')"  >确定</i-button>
                <i-button style="margin-left: 8px" @click="reload">返回</i-button>
            </form-item>

        </i-form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/basics/blocation.js?_${.now?long}"></script>
</body>
</html>